home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Online / Epic4 / share / epic / help / 6_functions / fexist < prev    next >
Text File  |  2001-03-21  |  993b  |  32 lines

  1. Synopsis:
  2.    $fexist(<file>)
  3.  
  4. Technical:
  5.    This function tests for the existence of the given file.  The function
  6.    permits tilde-expansion.
  7.  
  8. Practical:
  9.    This function is used when you want to see if a particular file exists.
  10.    This could be useful to make sure a file is present before trying to
  11.    load it.
  12.  
  13. Returns:
  14.    -1   error, unable to access file
  15.     1   file exists and client has read permission
  16.  
  17. Examples:
  18.    $fexist(/etc/passwd)                   probably will return 1
  19.    $fexist(~/.ircrc)                      probably will return 1 too
  20.    $fexist(fake_file)                     returns -1
  21.  
  22. See Also:
  23.    open(6)
  24.  
  25. Other Notes:
  26.    This function never returns 0.  This is worth noting, because the natural
  27.    tendency will be to check for the return value's existence, not its
  28.    actual value (meaning it always returns "true", as far as the client's
  29.    string parser is concerned).  This was done intentionally to match the
  30.    return values of $fsize().
  31.  
  32.